-- GENERATED SPELL FOR [Commander Jordan] --


function spell0_27237(pUnit, Event) --@Avenging Wrath,Self--
pUnit:FullCastSpellOnTarget(50837,pUnit)
pUnit:RegisterEvent('Sorts_27237', 10256, 1)
end

function spell1_27237(pUnit, Event) --@Consecration,Self--
pUnit:FullCastSpellOnTarget(32773,pUnit)
pUnit:RegisterEvent('Sorts_27237', 8000, 1)
end

function Sorts_27237(pUnit, Event)
local choix_sorts_27237 = math.random(0, 1)
if choix_sorts_27237 == 0 then
pUnit:RegisterEvent('spell0_27237', 1, 1)
end
if choix_sorts_27237 == 1 then
pUnit:RegisterEvent('spell1_27237', 1, 1)
end
end

function mob27237_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27237', math.random(1500, 3000), 1)
end

function mob27237_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27237_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27237_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27237, 1, 'mob27237_Action')
RegisterUnitEvent(27237, 2, 'mob27237_Leave')
RegisterUnitEvent(27237, 3, 'mob27237_Kill')
RegisterUnitEvent(27237, 4, 'mob27237_Die')
